package com.fyy.async.service.impl;

import com.fyy.async.service.IUserService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @Author fyy
 * @Description
 * @Date 2020/6/28 8:27
 */
@Service
public class UserService implements IUserService {

    @Async //声明异步调用
    @Override
    public void sendSms() {
        System.out.println("********send sms************   2");

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        System.out.println("********send sms************   3");
    }
}
